package cisdi.mes.sm.rm.dao;

import java.util.List;

import cisdi.mes.sm.rm.domain.SmRmMeasureDoc;
import cisdi.mes.sm.rm.domain.SmRmStorageContent;

public interface StorageContentDao {

	// 原料入库--计量单
	public void store(SmRmMeasureDoc md, String storageId, Double wgt);

	// 获取料仓物料总重
	public Double getStorageWgt(String storageId);

	// 根据主键获取一条库存数据
	public SmRmStorageContent getById(long contentId);

	// 获取料仓库存，按入库时间排序
	public List<SmRmStorageContent> getContents(String storageId);

	// 删除库存
	public void deleteContent(SmRmStorageContent content);

	// 减少库存重量
	public void decreaseWgt(SmRmStorageContent content, Double wgt);
	
	public void backContent(SmRmStorageContent content, Double wgt);
	
	public void backContent(SmRmStorageContent content);

	// 入库 - 来自其他料仓
	public void addContent(String to, SmRmStorageContent from);

	// 入库 - 来自其他料仓
	public void addContent(String to, SmRmStorageContent from, Double wgt);

	public List<SmRmStorageContent> findByStorageIdAndMaterialId(
			String storageId, String materialId);
	
}
